﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;
using Sub.Function;

namespace Sub.Function
{
     [DataContract(Name = "TokenResult")]
    public class TokenResult
    {
        [DataMember()]
        public string Data { get; set; }
        [DataMember()]
        public bool TimeOut
        {
            get
            {
                return _TimeOut;
            }
            set
            {
                _TimeOut = value;
                if (value)
                {
                    if (this.PageFilter != null)
                    {
                        PageFilter.ActionError = EnumType.eActionErrorType.SessionTimeOut;
                    }
                    if (this.ServiceAction != null)
                    {
                        this.ServiceAction.DataErrorType= EnumType.eActionErrorType.SessionTimeOut;
                    }
                }
            }
        }

        public PageFilter PageFilter { get; set; }

        public ActionService ServiceAction { get; set; }

        bool _TimeOut;

    }
}
